﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ResourcesInfo.aspx.cs"
    Inherits="BEGDC.CC.Web.CIS2.Overseas.ResourcesInfo" %>

<%@ Register Src="../../UserControls/Pager.ascx" TagName="Pager" TagPrefix="cc" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <link href="../../css/global.css" rel="stylesheet" type="text/css" />
    <link href="../../css/content/entity.css" rel="stylesheet" type="text/css" />
    <link href="../../css/content/themes/base/jquery-ui.css" rel="stylesheet" type="text/css" />
    <link href="../../css/main.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .directory-path
        {
            display: none;
        }
    </style>

    <script src="../../js/jquery-1.4.4.min.js" type="text/javascript"></script>

    <script src="../../js/jquery-ui.min.js" type="text/javascript"></script>

    <script src="../../js/entity.js.aspx" type="text/javascript"></script>

    <script type="text/javascript">
        $(function() {

            $(".entity-download a")
                .each(function() {
                    $(this)
                 
                        .attr("href", $(this).text())
                        .text("")
                       .show();
                });

            $(".entity-belongsto").val($(".entity-belongsto").attr("u"));

            $(".file-exist").each(function() {
                var $thisvalue = $(this);
                if ($thisvalue.text() == "True") {
                    $thisvalue.next().addClass('entity-download1');
                    $(".file-where").addClass('entity-download3');
                }
                else {
                    $thisvalue.next().addClass('entity-download2');
                    $(".file-where").addClass('entity-download4');
                }
                $thisvalue.hide();
            });

            $(".entity-province").val($(".entity-province").attr("u"));
        });


    </script>

</head>
<body>
    <form id="Form1" runat="server">
    <div class="mainbox">
        <div class="sitemapbox">
            <div id="info" class="sitemap">
                &nbsp;»&nbsp;Shared Info&nbsp;»&nbsp;Shared Info
            </div>
        </div>
        <table cellspacing="0" cellpadding="0">
            <tr>
                <td>
                    <!--tab区域-->
                    <div class="tabbox purplebg_dark">
                        <ul class="tabpos">
                            <li><span class="tab_active">
                                <%=Resources.PageTitles.BranchContacts%></span></li>
                        </ul>
                    </div>
                    <div class="formbox">
                        <span class=" float_lft">
                            <div class="formbox_float_lft">
                                <asp:Button ID="BtnAdd" runat="server" CssClass="entity-add" />
                            </div>
                            <div class="formbox_float_rgt">
                                <asp:TextBox ID="SearchText" runat="server" CssClass="txtbox width140 entity-search-text"
                                    ToolTip="Name"></asp:TextBox>
                                <asp:Button ID="Searchbtn" runat="server" CssClass="entity-search" />
                                <asp:Button ID="Cleanbtn" runat="server" CssClass="entity-clear" />
                            </div>
                        </span>
                    </div>
                </td>
            </tr>
        </table>
        <table width="100%" id="Table1" cellspacing="0" cellpadding="0" border="0">
            <tbody>
                <tr>
                    <td>
                        <asp:GridView ID="gvBranchContact" runat="server" AllowPaging="True" AllowSorting="True"
                            AutoGenerateColumns="False" DataKeyNames="DirectoryID" DataSourceID="edsBranchContact"
                            CssClass="tablestyle">
                            <RowStyle CssClass="tbody" />
                            <HeaderStyle CssClass="thead" ForeColor="#ffffff" />
                            <Columns>
                                <asp:BoundField DataField="Name" HtmlEncode="false" HeaderText="Name<br/>共享信息名称"
                                    SortExpression="Name" ItemStyle-Width="31%" />
                                <asp:BoundField DataField="Creator" HtmlEncode="false" HeaderText="Creator<br/>上传人"
                                    SortExpression="Creator" ItemStyle-Width="26%" />
                                <asp:BoundField DataField="Date" HtmlEncode="false" HeaderText="Create Time<br/>上传时间"
                                    SortExpression="Date" ItemStyle-Width="26%" />
                                <asp:BoundField DataField="Exist" HeaderText="Exist<br/>是否存在附件" HeaderStyle-CssClass="file-exist"
                                    ItemStyle-CssClass="file-exist" HtmlEncode="false" SortExpression="Exist" ItemStyle-Width="10%" />
                                <asp:ButtonField CommandName="Download" HeaderText="Download<br/>附件下载" ButtonType="Link"
                                    ItemStyle-CssClass="entity-download" DataTextField="DirectoryID" DataTextFormatString="../Domestic/FileDown.aspx?DirectoryID={0}"
                                    ItemStyle-Width="10%" />
                                <asp:ActionField HeaderText="Action<br />操作" HeaderStyle-CssClass="entity-action"
                                    ShowDisableButton="true" ShowModifyButton="true" ShowViewButton="true" ItemStyle-Width="60" />
                            </Columns>
                            <PagerTemplate>
                                <cc:Pager ID="Pager1" runat="server" />
                            </PagerTemplate>
                        </asp:GridView>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:DetailsView ID="dvBranchContact" runat="server" AutoGenerateRows="False" DataKeyNames="DirectoryID"
                            DataSourceID="edsBranchContact" EnableModelValidation="True" Visible="false"
                            CssClass="tablestyle2" DefaultMode="Edit">
                            <HeaderStyle CssClass="tablestyle2_Title"></HeaderStyle>
                            <HeaderTemplate>
                                <%=Resources.PageTitles.BranchContacts%>
                            </HeaderTemplate>
                            <FieldHeaderStyle CssClass="tablestyle2_tdTitle" />
                            <Fields>
                                <asp:CustomizeBoundField DataField="Name" HeaderText="Name(共享信息名称)" HtmlEncode="false"
                                    SortExpression="Name" ItemStyle-CssClass="entity-notnull-check entity-length-check"
                                    MaxLength="50" />
                                <asp:TemplateField HeaderText="Attachment (附件)" ItemStyle-CssClass="file-where entity-notnull-check">
                                    <ItemTemplate>
                                        <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%#Eval("DirectoryID","../Domestic/FileDown.aspx?DirectoryID={0}") %>'
                                            Text="DownLoad (下载附件)"></asp:HyperLink>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:FileUpload ID="File" runat="server" />
                                    </EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:FileUpload ID="File" runat="server" />
                                    </InsertItemTemplate>
                                </asp:TemplateField>
                                <asp:ActionField ShowEditButton="true" ShowInsertButton="true" ShowInsertMoreButton="true"
                                    ShowCloseButton="true" />
                            </Fields>
                        </asp:DetailsView>
                        &nbsp;
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
    <%--以下是数据源--%>
    <asp:EntityDataSource ID="edsBranchContact" runat="server" ConnectionString="name=CCEntities"
        DefaultContainerName="CCEntities" EnableDelete="True" EnableInsert="True" EnableUpdate="True"
        EntitySetName="BranchContact"  OnInserted="edsBranchContact_Inserted"
        OnUpdated="edsBranchContact_Updated">
    </asp:EntityDataSource>
    </form>
    <%--页面刷新时显示--%>
    <%-- <div id="dialog-message" title="Loading..." style="display: none">
        <p>
            <br />
            <span class="entity-loading"></span><span>Operation in process, please wait...<br />
                <br />
                处理中, 请稍候。。。</span>
        </p>
    </div>--%>
</body>
</html>
